USE [sesamo]
GO

/****** Object:  StoredProcedure [dbo].[ins_encuesta_otizacion_detalle]    Script Date: 13/04/2014 05:08:07 p.m. ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[ins_encuesta_otizacion_detalle]
	
	@codigo bigint,
	@cantidad bigint,
	@idcotizacion bigint,
	@precio float,
	@ultimoId INT OUTPUT
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
    -- Insert statements for procedure here
	INSERT INTO dbo.encuestas_cotizacion_detalle(codigo, cantidad, idcotizacion, precio)  
	VALUES (@codigo, @cantidad, @idcotizacion, @precio)
	SELECT @ultimoId = @@IDENTITY
END

GO

